<?
require_once('../lib/Config.php');
require_once('../lib/DB.gear.php');
require_once('../lib/lib.gear.php');
require_once('../lib/lib.garden.php');

if(isset($_POST['g_key_din39s03j23ogn']) && $_POST['g_key_din39s03j23ogn'] == G_KEY)
{
    $device_type   = $_POST['device_type'];
 	$type      = $_POST['type'];

	switch($type)
	{
		case 'android':
		    $data = array(
		                   'version'        => '6'
		                  );

		    $json_data = json_encode($data);
		    echo $json_data;
		break;

		case 'iphone':
		    $data = array(
		                   'version'        => '0'
		                  );

		    $json_data = json_encode($data);
		    echo $json_data;
		break;

		case 'update_using':
		break;

		case 'get_using_user':
		break;

		case 'post':
		break;

	}

}
else
{
    $data = array(
                   'status'  => 'error',
                  );
    $json_data = json_encode($data);
}

?>
